﻿using System.Collections.ObjectModel;
using System.Runtime.Serialization;
using System.Collections.Generic;
using System;

namespace Ausy.Servey.QuestionProvider.Contract
{
    /// <summary>
    /// Cette classe représente un Questionnaire
    /// </summary>
    [DataContract]
    public class Questionnaire
    {
        #region Identifier Property
        
        /// <summary>
        /// Identifiant du Questionnaire
        /// </summary>
        [DataMember]
        public Guid Identifier { get; set; } 

        #endregion
        
        #region Title Property
        /// <summary>
        /// Property title
        /// </summary>
        private string title;

        /// <summary>
        /// Property Title
        /// </summary>
        [DataMember]
        public string Title
        {
            get { return this.title; }
            set { this.title = value; }
        }
        #endregion

        #region QuestionCollection Property
        /// <summary>
        /// Property questionCollection
        /// </summary>
        private List<Question> questionCollection;

        /// <summary>
        /// Property QuestionCollection
        /// </summary>
        [DataMember]
        public List<Question> QuestionCollection
        {
            get { return this.questionCollection; }
            set { this.questionCollection = value; }
        }
        #endregion

        #region Constructor

        /// <summary>
        /// Constructeur par défaut
        /// </summary>
        public Questionnaire()
        {
            this.Identifier = Guid.Empty;
            this.QuestionCollection = new List<Question>();
        } 

        #endregion
    }
}
